﻿<%@ Page Language="C#" MasterPageFile="~/aspnet/admin/ForValidation.master" AutoEventWireup="true" CodeFile="CX_ill_Show.aspx.cs" Inherits="aspnet_admin_bock_ill_CX_ill_Show" Title="显示病历信息 Page" %>
<%@ Register Assembly="web表单验证控件" Namespace="CheckForm" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    &nbsp;<table align="center" border="0" cellpadding="2" cellspacing="1" class="border"
        height="116" width="100%">
        <tr>
            <td align="center" class="topbg" colspan="2" style="height: 30px">
                <strong>显示病历管理</strong></td>
        </tr>
        <tr>
            <td class="tdbg" style="width: 223px; height: 27px">
                提示信息:</td>
            <td class="tdbg" style="width: 787px; height: 27px">
                <asp:Label ID="tt" runat="server" CssClass="font-4"></asp:Label></td>
        </tr>
        <tr>
            <td class="tdbg" style="width: 223px; height: 27px">
                搜索姓名:</td>
            <td class="tdbg" style="width: 787px; height: 27px">
                <asp:TextBox ID="TextBox2" runat="server" Width="337px"></asp:TextBox>
                请输入姓名<asp:Button ID="Button1" runat="server" CssClass="box" Text="搜索" 
                    onclick="Button1_Click" />
            </td>
        </tr>
    </table>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SqlConn %>" 
        
        SelectCommand="SELECT * FROM [CX_ill] WHERE ([CX_ill_Name] LIKE '%' + @CX_ill_Name + '%')" 
        ConflictDetection="CompareAllValues" 
        DeleteCommand="DELETE FROM [CX_ill] WHERE [CX_ill_id] = @original_CX_ill_id" 
        InsertCommand="INSERT INTO [CX_ill] ([CX_ill_Name], [CX_ill_Age], [CX_ill_marry], [CX_ill_job], [CX_ill_Address], [CX_ill_post], [CX_ill_Tel], [CX_ill_date], [CX_ill_pwd], [CX_ill_ZhenLiao], [CX_ill_course], [CX_ill_Process], [CX_ill_story], [CX_ill_check], [CX_ill_other]) VALUES (@CX_ill_Name, @CX_ill_Age, @CX_ill_marry, @CX_ill_job, @CX_ill_Address, @CX_ill_post, @CX_ill_Tel, @CX_ill_date, @CX_ill_pwd, @CX_ill_ZhenLiao, @CX_ill_course, @CX_ill_Process, @CX_ill_story, @CX_ill_check, @CX_ill_other)" 
        OldValuesParameterFormatString="original_{0}" 
        UpdateCommand="UPDATE [CX_ill] SET [CX_ill_Name] = @CX_ill_Name, [CX_ill_Age] = @CX_ill_Age, [CX_ill_marry] = @CX_ill_marry, [CX_ill_job] = @CX_ill_job, [CX_ill_Address] = @CX_ill_Address, [CX_ill_post] = @CX_ill_post, [CX_ill_Tel] = @CX_ill_Tel, [CX_ill_date] = @CX_ill_date, [CX_ill_pwd] = @CX_ill_pwd, [CX_ill_ZhenLiao] = @CX_ill_ZhenLiao, [CX_ill_course] = @CX_ill_course, [CX_ill_Process] = @CX_ill_Process, [CX_ill_story] = @CX_ill_story, [CX_ill_check] = @CX_ill_check, [CX_ill_other] = @CX_ill_other WHERE [CX_ill_id] = @original_CX_ill_id AND [CX_ill_Name] = @original_CX_ill_Name AND [CX_ill_Age] = @original_CX_ill_Age AND [CX_ill_marry] = @original_CX_ill_marry AND [CX_ill_job] = @original_CX_ill_job AND [CX_ill_Address] = @original_CX_ill_Address AND [CX_ill_post] = @original_CX_ill_post AND [CX_ill_Tel] = @original_CX_ill_Tel AND [CX_ill_date] = @original_CX_ill_date AND [CX_ill_pwd] = @original_CX_ill_pwd AND [CX_ill_ZhenLiao] = @original_CX_ill_ZhenLiao AND [CX_ill_course] = @original_CX_ill_course AND [CX_ill_Process] = @original_CX_ill_Process AND [CX_ill_story] = @original_CX_ill_story AND [CX_ill_check] = @original_CX_ill_check AND [CX_ill_other] = @original_CX_ill_other">
        <SelectParameters>
            <asp:controlparameter ControlID="TextBox2" Name="CX_ill_Name" 
                PropertyName="Text" Type="String" />
        </SelectParameters>
        <deleteparameters>
            <asp:parameter Name="original_CX_ill_id" Type="Decimal" />
        </deleteparameters>
        <updateparameters>
            <asp:parameter Name="CX_ill_Name" Type="String" />
            <asp:parameter Name="CX_ill_Age" Type="Int32" />
            <asp:parameter Name="CX_ill_marry" Type="Byte" />
            <asp:parameter Name="CX_ill_job" Type="String" />
            <asp:parameter Name="CX_ill_Address" Type="String" />
            <asp:parameter Name="CX_ill_post" Type="Int32" />
            <asp:parameter Name="CX_ill_Tel" Type="String" />
            <asp:parameter Name="CX_ill_date" Type="DateTime" />
            <asp:parameter Name="CX_ill_pwd" Type="String" />
            <asp:parameter Name="CX_ill_ZhenLiao" Type="String" />
            <asp:parameter Name="CX_ill_course" Type="String" />
            <asp:parameter Name="CX_ill_Process" Type="String" />
            <asp:parameter Name="CX_ill_story" Type="String" />
            <asp:parameter Name="CX_ill_check" Type="String" />
            <asp:parameter Name="CX_ill_other" Type="String" />
            <asp:parameter Name="original_CX_ill_id" Type="Decimal" />
            <asp:parameter Name="original_CX_ill_Name" Type="String" />
            <asp:parameter Name="original_CX_ill_Age" Type="Int32" />
            <asp:parameter Name="original_CX_ill_marry" Type="Byte" />
            <asp:parameter Name="original_CX_ill_job" Type="String" />
            <asp:parameter Name="original_CX_ill_Address" Type="String" />
            <asp:parameter Name="original_CX_ill_post" Type="Int32" />
            <asp:parameter Name="original_CX_ill_Tel" Type="String" />
            <asp:parameter Name="original_CX_ill_date" Type="DateTime" />
            <asp:parameter Name="original_CX_ill_pwd" Type="String" />
            <asp:parameter Name="original_CX_ill_ZhenLiao" Type="String" />
            <asp:parameter Name="original_CX_ill_course" Type="String" />
            <asp:parameter Name="original_CX_ill_Process" Type="String" />
            <asp:parameter Name="original_CX_ill_story" Type="String" />
            <asp:parameter Name="original_CX_ill_check" Type="String" />
            <asp:parameter Name="original_CX_ill_other" Type="String" />
        </updateparameters>
        <insertparameters>
            <asp:parameter Name="CX_ill_Name" Type="String" />
            <asp:parameter Name="CX_ill_Age" Type="Int32" />
            <asp:parameter Name="CX_ill_marry" Type="Byte" />
            <asp:parameter Name="CX_ill_job" Type="String" />
            <asp:parameter Name="CX_ill_Address" Type="String" />
            <asp:parameter Name="CX_ill_post" Type="Int32" />
            <asp:parameter Name="CX_ill_Tel" Type="String" />
            <asp:parameter Name="CX_ill_date" Type="DateTime" />
            <asp:parameter Name="CX_ill_pwd" Type="String" />
            <asp:parameter Name="CX_ill_ZhenLiao" Type="String" />
            <asp:parameter Name="CX_ill_course" Type="String" />
            <asp:parameter Name="CX_ill_Process" Type="String" />
            <asp:parameter Name="CX_ill_story" Type="String" />
            <asp:parameter Name="CX_ill_check" Type="String" />
            <asp:parameter Name="CX_ill_other" Type="String" />
        </insertparameters>
    </asp:SqlDataSource>
    <br />
    
    
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConflictDetection="CompareAllValues" 
        ConnectionString="<%$ ConnectionStrings:SqlConn %>" 
        DeleteCommand="DELETE FROM [CX_ill] WHERE [CX_ill_id] = @original_CX_ill_id" 
        InsertCommand="INSERT INTO [CX_ill] ([CX_ill_id], [CX_ill_Name], [CX_ill_Age], [CX_ill_marry], [CX_ill_job], [CX_ill_Address], [CX_ill_post], [CX_ill_Tel], [CX_ill_date], [CX_ill_pwd], [CX_ill_ZhenLiao], [CX_ill_course], [CX_ill_Process], [CX_ill_story], [CX_ill_check], [CX_ill_other]) VALUES (@CX_ill_id, @CX_ill_Name, @CX_ill_Age, @CX_ill_marry, @CX_ill_job, @CX_ill_Address, @CX_ill_post, @CX_ill_Tel, @CX_ill_date, @CX_ill_pwd, @CX_ill_ZhenLiao, @CX_ill_course, @CX_ill_Process, @CX_ill_story, @CX_ill_check, @CX_ill_other)" 
        OldValuesParameterFormatString="original_{0}" 
        SelectCommand="SELECT * FROM [CX_ill] ORDER BY [CX_ill_id] DESC" 
        
        UpdateCommand="UPDATE [CX_ill] SET [CX_ill_Name] = @CX_ill_Name, [CX_ill_Age] = @CX_ill_Age, [CX_ill_marry] = @CX_ill_marry, [CX_ill_job] = @CX_ill_job, [CX_ill_Address] = @CX_ill_Address, [CX_ill_post] = @CX_ill_post, [CX_ill_Tel] = @CX_ill_Tel, [CX_ill_date] = @CX_ill_date, [CX_ill_pwd] = @CX_ill_pwd, [CX_ill_ZhenLiao] = @CX_ill_ZhenLiao, [CX_ill_course] = @CX_ill_course, [CX_ill_Process] = @CX_ill_Process, [CX_ill_story] = @CX_ill_story, [CX_ill_check] = @CX_ill_check, [CX_ill_other] = @CX_ill_other WHERE [CX_ill_id] = @original_CX_ill_id AND [CX_ill_Name] = @original_CX_ill_Name AND [CX_ill_Age] = @original_CX_ill_Age AND [CX_ill_marry] = @original_CX_ill_marry AND [CX_ill_job] = @original_CX_ill_job AND [CX_ill_Address] = @original_CX_ill_Address AND [CX_ill_post] = @original_CX_ill_post AND [CX_ill_Tel] = @original_CX_ill_Tel AND [CX_ill_date] = @original_CX_ill_date AND [CX_ill_pwd] = @original_CX_ill_pwd AND [CX_ill_ZhenLiao] = @original_CX_ill_ZhenLiao AND [CX_ill_course] = @original_CX_ill_course AND [CX_ill_Process] = @original_CX_ill_Process AND [CX_ill_story] = @original_CX_ill_story AND [CX_ill_check] = @original_CX_ill_check AND [CX_ill_other] = @original_CX_ill_other">
            <DeleteParameters>
                <asp:parameter Name="original_CX_ill_id" Type="Decimal" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:parameter Name="CX_ill_Name" Type="String" />
                <asp:parameter Name="CX_ill_Age" Type="Int32" />
                <asp:parameter Name="CX_ill_marry" Type="Byte" />
                <asp:parameter Name="CX_ill_job" Type="String" />
                <asp:parameter Name="CX_ill_Address" Type="String" />
                <asp:parameter Name="CX_ill_post" Type="Int32" />
                <asp:parameter Name="CX_ill_Tel" Type="String" />
                <asp:parameter Name="CX_ill_date" Type="DateTime" />
                <asp:parameter Name="CX_ill_pwd" Type="String" />
                <asp:parameter Name="CX_ill_ZhenLiao" Type="String" />
                <asp:parameter Name="CX_ill_course" Type="String" />
                <asp:parameter Name="CX_ill_Process" Type="String" />
                <asp:parameter Name="CX_ill_story" Type="String" />
                <asp:parameter Name="CX_ill_check" Type="String" />
                <asp:parameter Name="CX_ill_other" Type="String" />
                <asp:parameter Name="original_CX_ill_id" Type="Decimal" />
                <asp:parameter Name="original_CX_ill_Name" Type="String" />
                <asp:parameter Name="original_CX_ill_Age" Type="Int32" />
                <asp:parameter Name="original_CX_ill_marry" Type="Byte" />
                <asp:parameter Name="original_CX_ill_job" Type="String" />
                <asp:parameter Name="original_CX_ill_Address" Type="String" />
                <asp:parameter Name="original_CX_ill_post" Type="Int32" />
                <asp:parameter Name="original_CX_ill_Tel" Type="String" />
                <asp:parameter Name="original_CX_ill_date" Type="DateTime" />
                <asp:parameter Name="original_CX_ill_pwd" Type="String" />
                <asp:parameter Name="original_CX_ill_ZhenLiao" Type="String" />
                <asp:parameter Name="original_CX_ill_course" Type="String" />
                <asp:parameter Name="original_CX_ill_Process" Type="String" />
                <asp:parameter Name="original_CX_ill_story" Type="String" />
                <asp:parameter Name="original_CX_ill_check" Type="String" />
                <asp:parameter Name="original_CX_ill_other" Type="String" />
            </UpdateParameters>
            <InsertParameters>
                <asp:parameter Name="CX_ill_id" Type="Decimal" />
                <asp:parameter Name="CX_ill_Name" Type="String" />
                <asp:parameter Name="CX_ill_Age" Type="Int32" />
                <asp:parameter Name="CX_ill_marry" Type="Byte" />
                <asp:parameter Name="CX_ill_job" Type="String" />
                <asp:parameter Name="CX_ill_Address" Type="String" />
                <asp:parameter Name="CX_ill_post" Type="Int32" />
                <asp:parameter Name="CX_ill_Tel" Type="String" />
                <asp:parameter Name="CX_ill_date" Type="DateTime" />
                <asp:parameter Name="CX_ill_pwd" Type="String" />
                <asp:parameter Name="CX_ill_ZhenLiao" Type="String" />
                <asp:parameter Name="CX_ill_course" Type="String" />
                <asp:parameter Name="CX_ill_Process" Type="String" />
                <asp:parameter Name="CX_ill_story" Type="String" />
                <asp:parameter Name="CX_ill_check" Type="String" />
                <asp:parameter Name="CX_ill_other" Type="String" />
            </InsertParameters>
    </asp:SqlDataSource>
    
        <asp:GridView ID="GridView1" runat="server" BorderWidth="0px"   
        cellpadding="1" cellspacing="2" CssClass="border" Width="100%" 
        AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="CX_ill_id" 
        DataSourceID="SqlDataSource1" AllowSorting="True">
            <pagersettings firstpagetext="第一页" lastpagetext="最后页" nextpagetext="下一页" 
                previouspagetext="上一页" />
            <rowstyle cssclass="matrix_info" Height="30px" />
            <columns>
                <asp:boundfield DataField="CX_ill_id" HeaderText="系统编号" ReadOnly="True" 
                    SortExpression="CX_ill_id"></asp:boundfield>
                <asp:boundfield DataField="CX_ill_Name" HeaderText="姓    名" 
                    SortExpression="CX_ill_Name"></asp:boundfield>
                <asp:boundfield DataField="CX_ill_Age" HeaderText="年    龄" 
                    SortExpression="CX_ill_Age"></asp:boundfield>
                <asp:boundfield DataField="CX_ill_job" HeaderText="职    业" 
                    SortExpression="CX_ill_job"></asp:boundfield>
                <asp:boundfield DataField="CX_ill_Address" HeaderText="通信地址" 
                    SortExpression="CX_ill_Address"></asp:boundfield>
                <asp:boundfield DataField="CX_ill_Tel" HeaderText="联系电话" 
                    SortExpression="CX_ill_Tel"></asp:boundfield>
                <asp:boundfield DataField="CX_ill_date" HeaderText="初发病日期" 
                    SortExpression="CX_ill_date"></asp:boundfield>
                <asp:templatefield HeaderText="即往诊断" SortExpression="CX_ill_ZhenLiao">
                    <edititemtemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CX_ill_ZhenLiao") %>'></asp:TextBox>
                    </edititemtemplate>
                    <itemtemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# TextData.ForMatText(Eval("CX_ill_ZhenLiao").ToString(),0,50) %>'></asp:Label>
                    </itemtemplate>
                </asp:templatefield>
                <asp:templatefield HeaderText="操作" ShowHeader="False">
                    <itemtemplate>
                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                            CommandName="Delete" Text="删除" OnClientClick="if(confirm('您确定要删除吗')){return true;}else{return false;}" ></asp:LinkButton>
                        &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;   &nbsp;&nbsp;   
                        <a href="CX_ill_Edit.aspx?id=<%#Eval("CX_ill_id") %>"  target="_blank">显示详细</a>
               
                    </itemtemplate>
                </asp:templatefield>
            </columns>
            <pagerstyle horizontalalign="Center" />
        <selectedrowstyle cssclass="sec_color" />
        <HeaderStyle CssClass="topbg" Height="35px" />
        <editrowstyle cssclass="bgcolor" />
        <alternatingrowstyle cssclass="bgcolor" Height="30px" />
    </asp:GridView>

</asp:Content>